﻿/// <reference path="../GeneratedArtifacts/viewModel.js" />

myapp.AddEditRestriction.Details_postRender = function (element, contentItem) {
    contentItem.dataBind("screen.Restriction.Id", function (newValue) {
        contentItem.screen.details.displayName = "Restriction (" + (newValue == null ? "New" : newValue) + ")";
    });
};
myapp.AddEditRestriction.Delete_execute = function (screen) {
    screen.Restriction.deleteEntity();
};
myapp.AddEditRestriction.FavoritesFiltered_ItemTap_execute = function (screen) {
    if (screen.FavoritesFiltered.selectedItem != null) {
        screen.Restriction.Place = screen.FavoritesFiltered.selectedItem.Place;
    }
};
myapp.AddEditRestriction.Restriction_Image_render = function (element, contentItem) {
    createImageUploader(element, contentItem, "max-width: 300px; max-height: 300px");
};